<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:web="http://www.web.com.br/jsf/webutils">

    <!--

    Tag que implementa um dataTable usando o componente do Primefaces.

    ATRIBUTOS:

        id: Id - OBRIGATÓRIO
        value: Valor - OBRIGATÓRIO
        mode: Mode - OBRIGATÓRIO
        dynamic: Valor do atributo dynamic do componente - OPCIONAL (default = true)
        width: Define a largura - OPCIONAL (default = "100%")
        rendered: Indica se será renderizado - OPCIONAL (default = true)

     -->

     <p:dataTable
     	 widgetVar="dataTable"
         id="#{id}DataTable"
         rowKey="#{rowKey}"
         styleClass="dataTable-#{web:nvl(mode, 1)}"
         rowStyleClass="#{rowStyleClass}"
         mode="#{mode}"
         value="#{value}"
         var="dataTableItem"
         dynamic="#{web:nvl(dynamic, true)}"
         rendered="#{web:nvl(rendered, true)}"
         paginator="#{web:nvl(paginator, true)}"
         paginatorPosition="top"
         rows="#{web:nvl(rows, 10)}"
         lazy= "#{web:nvl(lazy, false)}"
         paginatorAlwaysVisible="#{web:nvl(paginatorAlwaysVisible,true)}"
         selection="#{selection}"
         emptyMessage="#{messages['global.msg.search_not_found']}"
         currentPageReportTemplate="#{component.rowCount} registros. Página {currentPage} de {totalPages}"
         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
         scrollable="#{web:nvl(scrollable, false)}"
         scrollWidth="#{scrollWidth}"
         style="#{style}">

         <ui:insert name="columns"/>

     </p:dataTable>

</ui:composition>

